﻿<UserControl x:Class="MediaBrowser.CustomControls.ScrollControl.ScrollButton"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <UserControl.Resources>
        <Storyboard x:Key="AnimBtClickRight">
            <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ButtonRight" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.StartPoint)">
                <SplinePointKeyFrame KeyTime="00:00:00" Value="0.664803,0.666296"/>
                <SplinePointKeyFrame KeyTime="00:00:00.2000000" Value="1.001,0.811"/>
            </PointAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="AnimBtClickLeft">
            <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ButtonLeft" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.StartPoint)">
                <SplinePointKeyFrame KeyTime="00:00:00" Value="0.127415,0.568184"/>
                <SplinePointKeyFrame KeyTime="00:00:00.2000000" Value="0.386,0.509"/>
            </PointAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="AnimBtClickRight_Reverse">
            <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ButtonRight" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.StartPoint)">
                <SplinePointKeyFrame KeyTime="00:00:00" Value="1.001,0.811"/>
                <SplinePointKeyFrame KeyTime="00:00:00.2000000" Value="0.664803,0.666296"/>
            </PointAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="AnimBtClickLeft_Reverse">
            <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ButtonLeft" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.StartPoint)">
                <SplinePointKeyFrame KeyTime="00:00:00" Value="0.386,0.509"/>
                <SplinePointKeyFrame KeyTime="00:00:00.2000000" Value="0.127415,0.568184"/>
            </PointAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="AnimCenterTranslate">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.3" Storyboard.TargetName="CursorScroll" Storyboard.TargetProperty="(Canvas.Left)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="50.906"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="UIElement.MouseLeftButtonDown" SourceName="ButtonR">
            <BeginStoryboard x:Name="AnimBtClickRight_BeginStoryboard" Storyboard="{StaticResource AnimBtClickRight}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="UIElement.MouseLeftButtonUp" SourceName="ButtonR">
            <BeginStoryboard x:Name="AnimBtClickRight_Reverse_BeginStoryboard" Storyboard="{StaticResource AnimBtClickRight_Reverse}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="UIElement.MouseLeftButtonDown" SourceName="ButtonL">
            <BeginStoryboard x:Name="AnimBtClickLeft_BeginStoryboard" Storyboard="{StaticResource AnimBtClickLeft}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="UIElement.MouseLeftButtonUp" SourceName="ButtonL">
            <BeginStoryboard x:Name="AnimBtClickLeft_Reverse_BeginStoryboard" Storyboard="{StaticResource AnimBtClickLeft_Reverse}"/>
        </EventTrigger>
    </UserControl.Triggers>
    <Viewbox Stretch="Fill">
        <Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="ButtonScroller" Clip="F1 M 0,0L 149.981,0L 149.981,29.9963L 0,29.9963L 0,0" Width="149.981" Height="29.996"
                MouseLeave="ButtonScroller_MouseLeave">
            <Canvas x:Name="MainCanvas" Width="149.981" Height="29.9963" Canvas.Left="0" Canvas.Top="0">
                <Path x:Name="Path" Width="143.858" Height="20.9965" Canvas.Left="3.5593" Canvas.Top="4.25025" Stretch="Fill" StrokeThickness="0.0999875" StrokeLineJoin="Round" Stroke="#FF000000" Fill="#FFFFFFFF" Data="M 11.6083,4.30025L 139.368,4.30025C 143.786,4.30025 147.368,7.88152 147.368,12.2992L 147.368,17.1978C 147.368,21.6155 143.786,25.1968 139.368,25.1968L 11.6083,25.1968C 7.19056,25.1968 3.60929,21.6155 3.60929,17.1978L 3.60929,12.2992C 3.60929,7.88152 7.19056,4.30025 11.6083,4.30025 Z "/>
                <Canvas x:Name="ButtonL" Width="27.29" Height="20.996" Canvas.Left="3.61" Canvas.Top="4.2" 
                        PreviewMouseUp="On_MouseUp"
                        PreviewMouseDown="Button_MouseDown" >
                    <Path x:Name="ButtonLeft" Width="27.291" Height="20.996" Stretch="Fill" StrokeThickness="0.0999875" StrokeLineJoin="Round" Stroke="#FF000000" Data="M 11.6586,4.24992L 22.8513,4.24992C 27.269,4.24992 30.8503,7.83119 30.8503,12.2489L 30.8503,17.1475C 30.8503,21.5652 27.269,25.1465 22.8513,25.1465L 11.6586,25.1465C 7.24089,25.1465 3.65962,21.5652 3.65962,17.1475L 3.65962,12.2489C 3.65962,7.83119 7.24089,4.24992 11.6586,4.24992 Z ">
                        <Path.Fill>
                            <LinearGradientBrush StartPoint="0.127415,0.568184" EndPoint="0.648944,0.568184">
                                <LinearGradientBrush.RelativeTransform>
                                    <TransformGroup>
                                        <SkewTransform CenterX="0.127415" CenterY="0.568184" AngleX="-14.8158" AngleY="0"/>
                                        <RotateTransform CenterX="0.127415" CenterY="0.568184" Angle="-55.662"/>
                                    </TransformGroup>
                                </LinearGradientBrush.RelativeTransform>
                                <GradientStop Color="#FF303030" Offset="0"/>
                                <GradientStop Color="#FFA4A1A1" Offset="0.990952"/>
                            </LinearGradientBrush>
                        </Path.Fill>
                    </Path>
                    <Path x:Name="LeftArrow" Width="5.35" Height="6.161" Canvas.Left="4.214" Canvas.Top="7.218" Stretch="Fill" StrokeThickness="0.0999875" StrokeLineJoin="Round" Stroke="#FF000000" Data="M 7.87388,14.4982L 13.1232,17.5289L 13.1232,11.4675L 7.87388,14.4982 Z ">
                        <Path.Fill>
                            <LinearGradientBrush StartPoint="-0.00952649,0.500003" EndPoint="1.00952,0.500003">
                                <GradientStop Color="#FFC0BEBE" Offset="0"/>
                                <GradientStop Color="#FFDAD8D8" Offset="0.509259"/>
                                <GradientStop Color="#FFF4F3F3" Offset="1"/>
                            </LinearGradientBrush>
                        </Path.Fill>
                    </Path>
                </Canvas>
                <Canvas x:Name="ButtonR" Width="27.291" Height="20.997" Canvas.Left="120.731" Canvas.Top="4.149" 
                        PreviewMouseUp="On_MouseUp"
                        PreviewMouseDown="Button_MouseDown">
                    <Path x:Name="ButtonRight" Width="27.291" Height="20.997" Stretch="Fill" StrokeThickness="0.0999875" StrokeLineJoin="Round" Stroke="#FF000000" Data="M 128.78,4.19942L 139.973,4.19942C 144.391,4.19942 147.972,7.78069 147.972,12.1984L 147.972,17.097C 147.972,21.5147 144.391,25.096 139.973,25.096L 128.78,25.096C 124.362,25.096 120.781,21.5147 120.781,17.097L 120.781,12.1984C 120.781,7.78069 124.362,4.19942 128.78,4.19942 Z ">
                        <Path.Fill>
                            <LinearGradientBrush StartPoint="0.664803,0.666296" EndPoint="1.24949,0.666296">
                                <LinearGradientBrush.RelativeTransform>
                                    <TransformGroup>
                                        <SkewTransform CenterX="0.664803" CenterY="0.666296" AngleX="7.14404" AngleY="0"/>
                                        <RotateTransform CenterX="0.664803" CenterY="0.666296" Angle="259.124"/>
                                    </TransformGroup>
                                </LinearGradientBrush.RelativeTransform>
                                <GradientStop Color="#FF303030" Offset="0"/>
                                <GradientStop Color="#FFA4A1A1" Offset="0.990952"/>
                            </LinearGradientBrush>
                        </Path.Fill>
                    </Path>
                    <Path x:Name="RightArrow" Width="5.224" Height="6.161" Canvas.Left="17.827" Canvas.Top="7.268" Stretch="Fill" StrokeThickness="0.0999875" StrokeLineJoin="Round" Stroke="#FF000000" Data="M 143.732,14.4982L 138.608,17.5289L 138.608,11.4675L 143.732,14.4982 Z ">
                        <Path.Fill>
                            <LinearGradientBrush StartPoint="-0.00975788,0.500001" EndPoint="1.00975,0.500001">
                                <GradientStop Color="#FFC0BEBE" Offset="0"/>
                                <GradientStop Color="#FFDAD8D8" Offset="0.509259"/>
                                <GradientStop Color="#FFF4F3F3" Offset="1"/>
                            </LinearGradientBrush>
                        </Path.Fill>
                    </Path>
                </Canvas>
                <Path x:Name="ContainerCursorScroll" Width="116.793" Height="20.9966" Canvas.Left="17.8608" Canvas.Top="4.25021" Stretch="Fill" StrokeThickness="0.0999875" StrokeLineJoin="Round" Stroke="#FF000000" Data="M 25.9098,4.3002L 126.605,4.3002C 131.023,4.3002 134.604,7.88147 134.604,12.2992L 134.604,17.1978C 134.604,21.6155 131.023,25.1968 126.605,25.1968L 25.9098,25.1968C 21.4921,25.1968 17.9108,21.6155 17.9108,17.1978L 17.9108,12.2992C 17.9108,7.88147 21.4921,4.3002 25.9098,4.3002 Z " 
                      PreviewMouseDown="ContainerCursorScroll_MouseDown"
                      PreviewMouseUp="On_MouseUp">
                    <Path.Fill>
                        <LinearGradientBrush StartPoint="0.762262,0.374381" EndPoint="0.762262,0.852868">
                            <GradientStop Color="#FF424242" Offset="0"/>
                            <GradientStop Color="#FF615F5F" Offset="0.990952"/>
                        </LinearGradientBrush>
                    </Path.Fill>
                </Path>
                <Path x:Name="CursorScroll" Width="52.141" Height="20.9" Canvas.Left="50.906" Canvas.Top="4.25" Stretch="Fill" StrokeThickness="0" StrokeLineJoin="Round" Stroke="#FF000000" Data="M 59.9449,5.39925L 95.9879,5.39925C 100.406,5.39925 103.987,8.98052 103.987,13.3983L 103.987,16.3979C 103.987,20.8156 100.406,24.3969 95.9879,24.3969L 59.9449,24.3969C 55.5272,24.3969 51.9459,20.8156 51.9459,16.3979L 51.9459,13.3983C 51.9459,8.98052 55.5272,5.39925 59.9449,5.39925 Z " RenderTransformOrigin="0.5,0.5"
                       PreviewMouseLeftButtonDown="CursorScroll_MouseLeftButtonDown">
                    <Path.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform x:Name="TranslateCursorScroll"/>
                        </TransformGroup>
                    </Path.RenderTransform>
                    <Path.Fill>
                        <LinearGradientBrush StartPoint="0.518727,0.152632" EndPoint="0.518727,0.836842">
                            <GradientStop Color="#FF0066FF" Offset="0"/>
                            <GradientStop Color="#FF393A3A" Offset="0.990952"/>
                        </LinearGradientBrush>
                    </Path.Fill>
                </Path>
            </Canvas>
        </Canvas>
    </Viewbox>
</UserControl>
